package com.danciyixue.boot.dcyx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.danciyixue.boot.dcyx.model.entity.UserCurrentProgram;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.danciyixue.boot.dcyx.model.query.UserCurrentProgramQuery;
import com.danciyixue.boot.dcyx.model.vo.CurrentProgramVO;
import com.danciyixue.boot.dcyx.model.vo.UserCurrentProgramVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户当前选择教材项信息Mapper接口
 *
 * @author youlaitech
 * @since 2025-06-22 07:38
 */
@Mapper
public interface UserCurrentProgramMapper extends BaseMapper<UserCurrentProgram> {

    /**
     * 获取用户当前选择教材项信息分页数据
     *
     * @param page 分页对象
     * @param queryParams 查询参数
     * @return {@link Page<UserCurrentProgramVO>} 用户当前选择教材项信息分页列表
     */
    Page<UserCurrentProgramVO> getUserCurrentProgramPage(Page<UserCurrentProgramVO> page, UserCurrentProgramQuery queryParams);

    /**
     * 根据用户ID获取当前教材详细信息
     *
     * @param userId 用户ID
     * @return 当前教材详细信息，包含系列、学期、学习进度等信息
     */
    CurrentProgramVO getCurrentProgramDetailByUserId(@Param("userId") Long userId);

}
